package com.FastTorchPro;

import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

public class PropertyPage extends PreferenceActivity implements OnPreferenceChangeListener, OnPreferenceClickListener {
	@Override
    protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            addPreferencesFromResource(R.xml.preference);
  
  		Preference closePref = (Preference) findPreference("closePref");
  		closePref.setOnPreferenceClickListener(this);
  		
  		
    }

	


	@Override
	public boolean onPreferenceChange(Preference arg0, Object arg1) {
		// TODO Auto-generated method stub
		if (arg0==null){
			return false;
		}
		return true;
	}

	@Override
	public void onBackPressed() {
	    // do something on back.
		this.finish();
	}
	
	 @Override
	  protected void onPause(){
		 this.finish();
	    super.onPause();
	  }



	@Override
	public boolean onPreferenceClick(Preference preference) {
		// TODO Auto-generated method stub
		this.finish();
		return false;
	}
}
